package com.liyongjian.apidoc.dal;

import java.util.List;

import org.springframework.data.repository.PagingAndSortingRepository;

import com.liyongjian.apidoc.domain.Api;
import com.liyongjian.apidoc.domain.enumm.ApiType;
import com.liyongjian.apidoc.domain.enumm.LiveDieState;


public interface ApiRepository extends PagingAndSortingRepository<Api, Long> {

    Api findByUserIdAndTypeAndUrlAndSysId(Long userId, ApiType type, String url, Long sysId);

    List<Api> findByUserIdAndSysIdAndModelIdAndState(Long userId, Long sysId, Long modelId,
            LiveDieState state);

    List<Api> findByUserIdAndState(Long userId, LiveDieState state);

}
